package l1j.server.server.command.executor;

import java.util.logging.Logger;

import l1j.server.server.model.Instance.L1PcInstance;
import l1j.server.server.serverpackets.S_SystemMessage;

public class L1CharInfoCheck implements L1CommandExecutor{
	
	private static Logger _log = Logger.getLogger(L1Action.class.getName());
	
	private L1CharInfoCheck() {
	}
	
	public static L1CommandExecutor getInstance() {
		return new L1CharInfoCheck();
	}
	@Override
	public void execute(L1PcInstance pc, String cmdName, String arg) {
		try {
			long curtime = System.currentTimeMillis() / 1000;
			if (pc.getQuizTime() + 20 > curtime ) {
				pc.sendPackets(new S_SystemMessage("20초간의 지연시간이 필요합니다."));
				return;
			}
			int hpr = pc.getHpr() + pc.getInventory(). hpRegenPerTick();
			int mpr = pc.getMpr() + pc.getInventory(). mpRegenPerTick();	

            pc.sendPackets(new S_SystemMessage("===================( 나의 정보 )===================="));				
			pc.sendPackets(new S_SystemMessage("\\fY(피틱:" + hpr + ')' + "(엠틱:" + mpr + ')' +"(PK횟수:" + pc.get_PKcount()));
            pc.sendPackets(new S_SystemMessage("===================================================="));
		    pc.setQuizTime(curtime);
		} catch (Exception e) {
		}
		
	}
}
